import api from "./api";
import axios from "../../../axios";

export const bannerQuery = (params) => {
  return axios({
    method: "get",
    url: api.home.banner,
    params
  })
}
//获取新闻分类
export const newsort = (params) => {
  return axios({
    method: "get",
    url: api.home.newSort,
    params,
    headers: {
      Authorization: window.localStorage.getItem("token")
    },
  })
}
// 获取新闻列表
export const newlist = (params) => {
  return axios({
    method: "get",
    url: api.home.newlist,
    headers: {
      Authorization: window.localStorage.getItem("token")
    },
    params
  })
}
// 根据分类获取新闻列表
export const presslist = (params) => {
  return axios({
    method: "get",
    url: api.home.newlist,
    headers: {
      Authorization: window.localStorage.getItem("token")
    },
    params
  })
}

export const ImgAll = () => {

  return axios({
    method: "get",
    url: api.All.ImgAll,
  })
}
